package com.example.springbootdeom.serviceImpl;


import com.example.springbootdeom.dao.ManageDao;
import com.example.springbootdeom.entity.*;
import com.example.springbootdeom.service.ManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ManageServiceImpl implements ManageService {
    @Autowired
    private ManageDao manageDao;

    @Override
    public boolean addUser(User u) {
        return manageDao.addUser(u);
    }

    @Override
    public boolean deleteUser(int id) {
        return manageDao.deleteUser(id);
    }

    @Override
    public List<User> getUser() {
        return manageDao.getUser();
    }

    @Override
    public boolean modify(User u) {
        return manageDao.modify(u);
    }

    @Override
    public boolean addClass(int id) {
        return manageDao.addClass(id);
    }

    @Override
    public List<Classs> getAllClass() {
        return manageDao.getAllClass();
    }

    @Override
    public List<Course> getAllCourse() {
        return manageDao.getAllCourse();
    }

    @Override
    public boolean setPassword(String password, int id) {
        return manageDao.setPassword(password,id);
    }

    @Override
    public String getOldPassword(int id) {
        return manageDao.getOldPassword(id);
    }

    @Override
    public List<Student> getStudent() {
        return manageDao.getStudent();
    }

    @Override
    public List<Teacher> getTeacher() {
        return manageDao.getTeacher();
    }


}
